<div class="panel panel-default" style="margin-bottom: 0px;">
    <div class="panel-heading clearfix">
            <span class="panel-title col-md-8 title">
                {{isEdit?'编辑用户':'新增用户'}}
            </span>
    </div>

    <div class="panel-body">
        <form class="form-horizontal" role="form">
            <div class="form-group">
                <label class="col-sm-3 control-label">登录帐号<span style="color: red;"> *</span> </label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" placeholder="请输入.."  ng-readonly="isEdit" ng-model="windowModel.loginName" style="border: 1px solid #ccc;">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">姓名<span style="color: red;"> *</span> </label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" placeholder="请输入.." ng-model="windowModel.userName" style="border: 1px solid #ccc;">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">性别<span style="color: red;"> *</span> </label>
                <div class="col-sm-8" dropdown>
                    <a type="button" class="btn btn-default dropdown-toggle"
                        dropdown-toggle>{{sexText}} <span class="caret"></span>
                    </a>

                    <ul class="dropdown-menu">
                        <li ng-click="setSex(0)"><a href>男</a></li>
                        <li ng-click="setSex(1)"><a href>女</a></li>
                    </ul>
                </div>
            </div>

            <div class="form-group" ng-repeat="userOrg in userOrgs">

                <label class="col-sm-3 control-label">所属组织{{$index+1}}<span style="color: red;"> *</span> </label>

                <div class="col-sm-5">
                    <div class="input-group">
                        <div class="input-group-btn">
                            <input type="text" class="form-control" style="width:180px;border: 1px solid #ccc;" placeholder="请选择组织.." ng-readonly="true" value="{{newOrgName[$index].orgName}}">
                            <span href class="btn btn-primary hand"
                               data-fc-org-user-picker data-type="org" data-title="选择组织" data-single-org="true" data-on-select="getSelectedOrg($chosenList,$index)">
                                ...
                            </span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-4 input-group" style="display: inline-flex;padding-left: 10px;">
                    <div class="col-sm-8" style="padding: 0;">
                        <input type="text" class="form-control" placeholder="岗位/职务.." ng-model="windowModel.userOrg[$index].post" style="width:130px;border-radius: 4px;border: 1px solid #ccc;">
                    </div>
                    <a class="col-sm-2 hand" ng-click="cancelOrg($index)" style="padding: 0;padding-left: 5px;">
                        <span class="glyphicon glyphicon-trash" style="margin: 10px;" ></span>
                    </a>
                </div>

            </div>

            <div class="form-group">
                <div class="col-sm-3"></div>
                <div class="col-sm-8">
                    <button type="button" class="btn btn-default btn-sm" ng-click="addOrg()">
                        <span class="glyphicon glyphicon-plus"></span> 添加更多组织
                    </button>
                </div>
            </div>

        </form>
    </div>

    <!--确定取消按钮-->
    <div class="panel-footer" style="height: 55px;">
        <div style="text-align: right;">
            <button type="submit" class="btn btn-primary" ng-click="submit()">保存</button>&nbsp;
            <button class="btn btn-default" ng-click="cancel()">取消</button>
        </div>
    </div>

</div>
